import request from '@/utils/request'
import defaultSettings from '@/settings'

// 异常处理列表查询
export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandling/search`,
}

// 异常处理审核列表查询
export const approveUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingApprove/search`,
}

// 异常处理历史列表查询
export const historyQueryUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingHistoryQuery/search`,
}

// 异常处理详情
export function exceptionHandlingDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandling/detail`,
    method: 'get',
    params: data,
  })
}

// 异常处理拒绝
export function exceptionHandlingRedisolve(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandling/redisolve`,
    method: 'post',
    data,
  })
}

// 异常处理重新发送
export function exceptionHandlingResend(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandling/send`,
    method: 'post',
    data,
  })
}

// 异常处理审核明细
export function exceptionHandlingApproveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingApprove/detail`,
    method: 'get',
    params: data,
  })
}

// 异常处理审核通过
export function exceptionHandlingApprove(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingApprove/approve`,
    method: 'post',
    data,
  })
}

// 异常处理审核拒绝
export function exceptionHandlingReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingApprove/reject`,
    method: 'post',
    data,
  })
}

// 异常处理历史记录明细
export function exceptionHandlingHistoryQueryDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/exceptionHandling/ExceptionHandlingHistoryQuery/detail`,
    method: 'get',
    params: data,
  })
}
